<?php


namespace App\Http\Requests\Product\Index;


use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class ConsumableRequest extends FormRequest
{
    /**
     * @return array
     * @author luffyzhao@vip.126.com
     */
    public function rules()
    {
        return [
            'consumables' => ['nullable', 'array'],
            'consumables.*' => [Rule::exists('consumable', 'id')],
        ];
    }
}